package com.hb.core.pojo.project.calibration.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hb.core.pojo.Attachments;
import com.hb.core.pojo.project.calibration.dto.BidWinResultSupplyDTO;
import com.hb.core.pojo.project.calibration.entity.BidWinResultSupply;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 中标通知书关联投标人表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2021-09-28
 */
public interface BidWinResultSupplyMapper extends BaseMapper<BidWinResultSupply> {

    /**
     * 获取指定中标通知书下的供应商中标通知书详情
     *
     * @param successfulNoticeId
     * @param tenderId
     * @return
     */
    List<BidWinResultSupply> listSupplies(@Param("successfulNoticeId") Long successfulNoticeId, @Param("bidderId") Long bidderId);

    /**
     * 更新中标人中标金额
     *
     * @param tenderId
     * @param amount
     * @return
     */
    int updateBidPrice(@Param("id") Long id, @Param("amount") BigDecimal amount, @Param("attachments") Attachments attachments);
    /**
     *
     * @Description: 根据中标结果公示id查询 所有的标段信息
     * @Author: zhongdl
     * @Date:2022/1/5 17:11
     * @param pages:
     * @param winResultId:
     * @return: {@link Page<  BidWinResultSupply > }
     **/
    Page<BidWinResultSupplyDTO> pageIncludeBidSection(@Param("page") Page pages, @Param("winResultId") Long winResultId);
    /**
     *
     * @Description:  根据中标结果id查询多个中标人
     * @Author: zhongdl
     * @Date:2022/1/10 9:03
     * @param winResultId: 中标结果ID
     * @return: {@link List<  BidWinResultSupplyDTO > }
     **/
    List<BidWinResultSupplyDTO> listSuccessfulNoticeSupply(@Param("winResultId") Long winResultId);



    /**
     * 查询当前标段下的中标企业
     * @author tian
     * @date 2022-2-28 18:24
     * @param sectionId
     * @return java.lang.Integer
     */
    BidWinResultSupplyDTO getWinResultSupplyBySectionId(@Param("sectionId")Long sectionId);

}
